<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <input type="hidden" name="row[type]" value="2">
    <div class="form-group classify1">
        <label class="control-label col-xs-12 col-sm-2">{:__('Classify1')}:{$row['classify1']}</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('classify1', $classify1Data, $row['classify1'])}
        </div>
    </div>
    <div class="form-group classify2">
        <label class="control-label col-xs-12 col-sm-2">{:__('Classify2')}:{$row['classify2']}</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('classify2', $classify2Data[$row['classify1']], $row['classify2'])}
        </div>
    </div>
    <div class="form-group classify3">
        <label class="control-label col-xs-12 col-sm-2">{:__('Classify3')}:{$row['classify_id']}</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[classify_id]', $classify2Data[$row['classify2']], $row['classify_id'])}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control form-control" name="row[title]" type="text" value="{$row.title}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" data-rule="required" class="form-control editor form-control" rows="5" name="row[content]" cols="50">{$row.content}</textarea>
        </div>
    </div>
    <div class="form-group group-files">
        <label class="control-label col-xs-12 col-sm-2">{:__('Files')}:</label>
        <div class="col-xs-12 col-sm-8">
            {foreach name="$row.files" item="vo"}
            <div class="row row-files" data-index="{$key}">
                <div class="col-md-12">
                    <label class="control-label col-xs-12 col-sm-2">切片文件:</label>
                    <div class="col-xs-12 col-sm-8">
                        <div class="input-group">
                            <input type="text" name="row[files][{$key}][file]" id="c-file-{$key}" class="form-control" value="{$vo.file}"/>
                            <div class="input-group-addon no-border no-padding">
                                <span><button id="plupload-local" class="btn btn-danger plupload" data-input-id="c-file-{$key}" data-url="ajax/upload" data-maxsize="10000MB"><i class="fa fa-upload"></i> 上传</button></span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-12">
                    <label class="control-label col-xs-12 col-sm-2">切片名称:</label>
                    <div class="col-xs-12 col-sm-8">
                        <input type="text" name="row[files][{$key}][name]" id="c-local" class="form-control" value="{$vo.name}"/>
                    </div>
                </div>
                <div class="col-md-12">
                    <label class="control-label col-xs-12 col-sm-2">切片封面:</label>
                    <div class="col-xs-12 col-sm-8">
                        <div class="input-group">
                            <input id="c-image-{$key}" class="form-control" size="50" name="row[files][{$key}][image]" type="text" value="{$vo.image}">
                            <div class="input-group-addon no-border no-padding">
                                <span><button type="button" id="plupload-image-{$key}" class="btn btn-danger plupload" data-input-id="c-image-{$key}" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image-{$key}"><i class="fa fa-upload"></i> 上传</button></span>
                                <span><button type="button" id="fachoose-image-{$key}" class="btn btn-primary fachoose" data-input-id="c-image-{$key}" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> 选择</button></span>
                            </div>
                            <span class="msg-box n-right"></span>
                        </div>
                        <ul class="row list-inline plupload-preview" id="p-image-{$key}"></ul>
                    </div>
                </div>
                <div class="col-md-10 select-remove">
                    <a href="javascript:;" class="btn btn-sm btn-danger btn-remove-files"><i class="fa fa-times"></i> 移除</a>
                </div>
            </div>
            {/foreach}
            <a href="javascript:;" class="btn btn-sm bg-purple btn-append-files"><i class="fa fa-plus"></i> 添加数字切片</a>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Hits')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-hits" data-rule="required" class="form-control form-control" name="row[hits]" type="number" value="{$row.hits}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" class="form-control form-control" name="row[weigh]" type="number" value="{$row.weigh}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
